<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/" %>"/>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<!--<script type="text/javascript" src=""></script><link href="" type="text/css" rel="stylesheet" />-->
<script type="text/css">

#studentnumber
{ color:red; font-size:20px; margin:100px;}

</script>
</head>
<script type="text/javascript">
function userCheck(){
	if (document.form1.studentnumber.value == "") {
		window.alert("请输入学号！");
		return false;
	}
	if (!(document.form1.studentnumber.value.length == 10)) {
		window.alert("学号必须是10位数字");
		return false;
	}
	if (document.form1.password.value == "") {
		window.alert("新密码不能为空！");
		return false;
	}
	if (document.form1.againpassword.value == "") {
		window.alert("请确认密码！");
		return false;
	}
	if (document.form1.againpassword.value != document.form1.password.value) {
		window.alert("您输入的两次密码不相同，请重新输入新密码！");
		return false;
	} else if (document.form1.againpassword.value.length<5 || document.form1.againpassword.value.length>10) {
		window.alert("密码必须在5—10位之间");
		return false;
	} 
	
}

</script>
<body>
<Font size=6
		style="position: absolute; top: 35%; left: 45%; margin: -50px 0 0 -100px;">
		<center>
			<font size="8"><b>更改密码</b></font><br> <font
				size="5"><b> &nbsp;请输入新密码</b></font> <br></br>
				<form action="<%=request.getContextPath() %>/ForgetPasswordServlet" Method="post" name="form1"
				onsubmit="return userCheck()">
				<input type="hidden" name="action" value="add" />
				<table>
				<tr>
						<td>&nbsp;&nbsp;学号：</td>
						<td><input class="txtInput" type="text"  name="studentnumber"
							id="studentnumber" maxlength='10' value="1467002000" style="width:200px; height:30px;font-size:25px;" ></td>
					</tr>
					<tr>
						<td>&nbsp;新密码：</td>
						<td><input class="txtInput" type=password  name="password" 
							id="password" maxlength='10' style="width:200px; height:30px;font-size:35px;"></td>
					</tr>
					<tr>
						<td>确认密码：</td>
						<td><input class="txtInput" type=password   name="againpassword" 
							id="againpassword" maxlength='10'  style="width:200px; height:30px;font-size:35px;"></td>
					</tr>
					<tr>
                    
						<td height="30" valign="bottom" colspan="2" align="right"><br><input
							type="submit" name="btnLogin" value="确认" style="width:100px;height:30px;font-size:25px;font-weight: bolder;"
							onclick="return userCheck();" id="btnLogin" class="btn1" /></td></tr>
					</table></form></center></Font>
</body>
</html>